<template>
  <div
    id="app"
    :style="{
      height: bodyHeight + 'px',
      width: bodyWidth + 'px',
      ...bodyStyle,
    }"
  >
    <router-view />
  </div>
</template>

<script>
export default {
  data() {
    return {
      bodyHeight: document.documentElement.clientHeight,
      bodyWidth: document.documentElement.clientWidth,
    };
  },
  computed: {
    bodyStyle() {
      return bodyStyle;
    },
  },
  mounted() {
    const that = this;
    window.onresize = () => {
      return (() => {
        window.fullHeight = document.documentElement.clientHeight;
        that.bodyHeight = window.fullHeight;
        window.fullWidth = document.documentElement.clientWidth;
        that.bodyWidth = window.fullWidth;
      })();
    };
  },
};
</script>

<style lang="less">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: left;
  color: #2c3e50;
  background-color: #0a1926;
  padding: 0px;
  margin: 0px;
}
</style>
